package com.zty.errors;

import com.zty.interfaces.IResponse;

/**
 * @Author ZTY
 * @Description 元数据模块自定义异常枚举类
 * @Date 0:30 2023-12-24
 **/

public enum EnumMetaException implements IResponse {
    NOT_ENOUGH_CHUNK_SERVER(1001,"存活的机器数量不够"),
    META_FILE_NOT_FOUND(1002,"文件元数据不存在"),
    CHUNK_FILE_NOT_UPLOADED(1003,"分片未上传"),
    NO_CHUNK_META_AVAILABLE(1004,"分片丢失或不可用")
    ;

    private final int code;
    private final String message;

    EnumMetaException(int code,String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return message;
    }
}
